#include "zom.h"



zom::zom(int X, int Y, int T, int L)
{
    init_life=life=L;
    x=X;
    y=Y;
    type=T;
}

zom::~zom()
{
}

void zom::RenewPos()
{
    x-=walk_speed;
    if(reduce_speed)
    {
        reduce_speed_pre+=reduce_fre;
    }
    if(reduce_speed_pre>=reduce_speed_time) //恢复速度
    {
        reduce_speed_pre=0;
        reduce_speed=false;
        walk_speed*=2;
        eat_fre/=2;
    }
}
